<template>
  <div>
    <q-uploader
        label="简历上传"
        auto-upload
        url="/v1/talent-api/resume-upload"
        @uploaded="handleAvatarSuccess"
        field-name="file"
        :max-file-size="2*1024*1024"
    >
    </q-uploader>
  </div>
</template>

<script>
export default {
  name: 'ResumeUpload',
  props: {},
  data () {
    return {}
  },
  methods: {
    handleAvatarSuccess (info) {
      const { xhr } = info
      const data = JSON.parse(xhr.response).data
      this.$emit('input', data)
    }
  }
}
</script>

<style scoped>

</style>
